package com.guowei.jiecloudbackstage.roommessage.service.impl;

import com.guowei.jiecloudbackstage.common.api.vo.Result;
import com.guowei.jiecloudbackstage.roommessage.entity.Roommessage;
import com.guowei.jiecloudbackstage.roommessage.mapper.RoommessageMapper;
import com.guowei.jiecloudbackstage.roommessage.service.IRoommessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guowei.jiecloudbackstage.staff.entity.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ym
 * @since 2021-07-13
 */
@Service
public class RoommessageServiceImpl extends ServiceImpl<RoommessageMapper, Roommessage> implements IRoommessageService {

    @Autowired
    private RoommessageMapper roommessageMapper;

    @Override
    public Result selectAll() {
        List<Roommessage> list = new ArrayList<>();
        list = roommessageMapper.selectAll();
        return Result.ok(200, list);
    }

    @Override
    public Result roomAbleCount() {
        int count = roommessageMapper.roomAbleCount();
        return Result.ok(200, count);
    }

    @Override
    public Result roomUnAbleCount() {
        int count = roommessageMapper.roomAbleCount();
        return Result.ok(200, count);
    }

    @Override
    public Result roomCount() {
        int count = roommessageMapper.roomCount();
        return Result.ok(200, count);
    }

    @Override
    public Result roomClear() {
        int count = roommessageMapper.roomClear();
        return Result.ok(200, count);
    }

    @Override
    public Result roomDirty() {
        int count = roommessageMapper.roomDirty();
        return Result.ok(200, count);
    }
}
